package com.laputa.model.manager;

import java.util.*;
import com.laputa.dao.*;
import com.laputa.dao.model.*;


public class BuildingManager{

	private BuildingDao buildingDao;
	
	public void setBuildingDao(BuildingDao bd){
		this.buildingDao = bd;
	}
	
	public void delete(String id) {
		buildingDao.delete(new Long(id));
	}

	public List getAll() {
		return buildingDao.getAll();
	}

	public Building getBuilding(String id) {
		return buildingDao.getBuilding(new Long(id));
	}
	
	public Building getBuildingByHolder(String groundID){
		return buildingDao.getBuildingByHolder(new Long(groundID));
	}
	
	//TODO: May use Spring Factory to new the building object
	public void save(Building p) {
		buildingDao.save(p);
	}

}
